Skip to content

Propagate Function Invocations#216

Open
rcosta358 wants to merge 3 commits intoimprove-simplificationfrom
function-invocation-simplification
Open

Propagate Function Invocations#216
rcosta358 wants to merge 3 commits intoimprove-simplificationfrom
function-invocation-simplification

Conversation

@rcosta358
Copy link
Copy Markdown
Collaborator

@rcosta358 rcosta358 commented May 9, 2026

Description

This PR allows function invocations to be on the LHS of mappings (instead of just variables).
This works by using the function string representation as a key in the variable resolver map, meaning they behave as if they were variables.
For example, func(a) == func(b) && func(b) == 1func(a) == 1.

Example

Before

State Refinement Error: Expected state size(stack²⁹⁵) > 0 but found size(stack²⁹⁵) == size(stack²⁹⁴) - 1 && size(stack²⁹⁴) == size(stack²⁹²) + 1 && size(stack²⁹²) == 0

After

State Refinement Error: Expected state size(stack²⁹⁴) > 0 but found size(stack²⁹⁴) == 0

Related Issue

None.

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Code refactoring

Checklist

  • Added tests in ExpressionSimplifierTest
  • mvn test passes locally
  • Updated docs/README if behavior or API changed

@rcosta358 rcosta358 requested a review from CatarinaGamboa May 9, 2026 21:48
@rcosta358 rcosta358 self-assigned this May 9, 2026
@rcosta358 rcosta358 added enhancement New feature or request simplification Related to the simplification of expressions labels May 9, 2026
@rcosta358 rcosta358 changed the title Function Invocation Simplification Propagate Function Invocations May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request simplification Related to the simplification of expressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant